package Practice.Practice_01;

public class demo09 {
    public static void main(String[] args){
        printRectangle(5,8);
        int area = getArea(5,8);
        System.out.println("The area is " + area);
        printRectangle(8,12);
        int area2 = getArea(8,12);
        System.out.println("The area is " + area2);
        printRectangle(12,12);
        int area3 = getArea(12,12);
        System.out.println("The area is " + area3);
    }
    public static void printRectangle(int height,int width){
        for(int i = 1; i <= height; i++){
            for(int j = 1; j <= width; j++){
                System.out.print("*  ");
            }
            System.out.println();
        }
    }
    public static int getArea(int a,int b){
        int temp = a * b;
        return temp;
    }
}
